<?php

use Phinx\Migration\AbstractMigration;

final class ChangeColumnStatusInStatusTable extends AbstractMigration
{
    public function up()
    {
        $this->table('status')
            ->changeColumn('correspond', 'enum', [
                'values' => 'blocked,not_started,in_progress,daily,feedback,done,hide,publish,wait_publish',
                'default' => 'blocked',
                'comment' => '状态从属关系',
                'null' => false
            ])
            ->save();
    }

    public function down()
    {
        $this->table('status')
            ->changeColumn('correspond', 'enum', [
                'values' => 'blocked,not_started,in_progress,daily,feedback,done,hide,publish',
                'default' => 'blocked',
                'comment' => '状态从属关系',
                'null' => false
            ])
            ->save();
    }
}
